/**
 * Created by Administrator on 2017/3/23.
 */
import sel from '../../index.js';
import './bund.scss';
export default {
  init: function () {
    sel.app.controller('bundController',['bund','$scope','$http',function (bund,$scope,$http) {
      $scope.title = '捆绑图';
      $http.get('api/tree').then(function (data) {
        $scope.nodes = data.data.data.data.ciNodes;
        $scope.lines = data.data.data.data.ciRltLines;
      });
      $scope.show = function () {
       sel.d3.select('svg').remove();
        var ele = sel.d3.select('.bund').append('svg');
        var name = bund.draw()(ele);
        name.changeType('id').changeName('ciCode').changeNodeR(20).bund($scope.lines,$scope.nodes,700);
      };


    }]);
  }
}